from Keyword import Keyword

web=Keyword()
web.openBrower()
web.visiturl('http://www.testingedu.com.cn:8000/index.php/Home/user/login.html')
web.input('//*[@id="username"]',"13800138006")
web.input('//*[@id="password"]',"123456")
web.input('//*[@id="verify_code"]',"1111")
web.sleep('1.5')
web.click('//a[@name="sbtbutton"]')
web.sleep('2')
web.click("//li/a[text()='个人信息']")
web.click('//*[@id="preview"]')
web.swich_iframe('//iframe')
web.input('(//input[@name="file"])[last()]',r"C:\_locales\p1.jpg")
web.sleep("2")
web.click('//div[text()="确定使用"]')
web.sleep("2")
web.input('//*[@id="nickname"]','独孤九剑')
web.click('//*[@id="man"]')
web.input('//*[@id="birthday"]','1947-05-14')
web.click('//input[@value="确认保存"]')



